<?php ?>
<script type="text/javascript">
	  $(document).ready(function() { 
	  	  $('#caseData1').dataTable( {
					"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
					"sPaginationType": "full_numbers",	
                    "aaSorting": [[ 0, "asc" ]],
                    "iDisplayLength": 10,
					"bJQueryUI": true,
					"sDom": '<"H"frlT><"clear">t<"clear"><"F"ip>',
					'bProcessing'    : true,
					'bServerSide'    : true,
					'sAjaxSource'    :  '<?php echo site_url(); ?>/engineer/diagnosis/getdispatch',
					'fnServerData': function(sSource, aoData, fnCallback)
					{
					  $.ajax
					  ({
						'dataType': 'json',
						'type'    : 'POST',
						'url'     : sSource,
						'data'    : aoData,
						'success' : fnCallback
					  });
					},	
						
					"oTableTools": {
						"sSwfPath": "<?php echo base_url()?>assets/media/swf/copy_csv_xls_pdf.swf",
						"aButtons": [
								"csv",
								"xls",
								{
									"sExtends": "pdf",
									"sPdfOrientation": "landscape",
									"sPdfMessage": ""
								},
								"print"
						]
					},
					"oLanguage": {
					  "sSearch": "Filter: "
					},
					"aoColumns": [ 
					  null,null,null,null,null,null,null,
					  { "bSortable": false }
					]
					
                } );
	  })
</script>
<?php ?>
<script type="text/javascript">
	  $(document).ready(function() { 
	  	  $('#nonwarranty_caseData1').dataTable( {
					"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
					"sPaginationType": "full_numbers",	
                    "aaSorting": [[ 0, "asc" ]],
                    "iDisplayLength": 10,
					"bJQueryUI": true,
					"sDom": '<"H"frlT><"clear">t<"clear"><"F"ip>',
					'bProcessing'    : true,
					'bServerSide'    : true,
					'sAjaxSource'    :  '<?php echo site_url(); ?>/engineer/diagnosis/nonwarranty_getdispatch',
					'fnServerData': function(sSource, aoData, fnCallback)
					{
					  $.ajax
					  ({
						'dataType': 'json',
						'type'    : 'POST',
						'url'     : sSource,
						'data'    : aoData,
						'success' : fnCallback
					  });
					},	
						
					"oTableTools": {
						"sSwfPath": "<?php echo base_url()?>assets/media/swf/copy_csv_xls_pdf.swf",
						"aButtons": [
								"csv",
								"xls",
								{
									"sExtends": "pdf",
									"sPdfOrientation": "landscape",
									"sPdfMessage": ""
								},
								"print"
						]
					},
					"oLanguage": {
					  "sSearch": "Filter: "
					},
					"aoColumns": [ 
					  null,null,null,null,null,null,
					  { "bSortable": false }
					]
					
                } );
	  })
</script>
<script type="text/javascript">
var arr=new Array('img1','img2','img3');
var arr1=new Array();
 var cnt=3;
 var tt;
Array.prototype.inArray = function (value)
{

var i;
for (i=0; i < this.length; i++) 
{
        if (this[i] == value) 
        {
        return true;
        }
}
return false;
};
function Show(Click_Menu)
{
    tt=Click_Menu.id;
    for(i=1;i<=cnt;i++)
    {
        var tmp="display"+i;
        if(tmp==tt)
        {
           if(Click_Menu.style.display=="none")
           {
              Click_Menu.style.display="";
           }  
        }
        else
        {
            document.getElementById(tmp).style.display ="none";
        }
    }
}

function disp()
{
    document.getElementById('display1').style.display="";
    document.getElementById('display2').style.display="none";
    document.getElementById('display3').style.display="none";
}
</script>
<body onload='disp()'>
<div class="header">
            
            <h1 class="page-title">Completed Diagnosis</h1>
        </div>
        
                <ul class="breadcrumb">
         
            <li class="active">Completed Diagnosis</li>
        </ul>
		  <table width=250 cellspacing=0 cellpadding=0><tr>
  <td><a  class="btn  btn-primary" href="javascript:Show(display1);"> Warranty</a>
  <a  class="btn btn-primary"href="javascript:Show(display2);">Non-Warranty </a>
  
  </td></tr>
  <tr><td>
<div class="row-fluid">
<div class="span12 pad_all">
  <span id="display1">
<table id="caseData1" cellpadding=0 cellspacing=6 width="100%" class="table table-bordered dataTables_wrapper">
 <caption><h4>Warranty</h4></caption>
   <thead>
    <tr>
        <th>ID</th>
		<th>Receipt No.</th>
		<th>Case No.</th>
         <th>Started Date</th>
        <th> Status</th>                       
		<th>Customer Name </th>
        <th>Contact No.</th>       
        <th style="width:45px;">Action</th>        
    </tr>
    </thead>
    <tbody>
        

    </tbody>
</table> 
  </span>
  <span id="display2" style="display:none">
<table id="nonwarranty_caseData1" cellpadding=0 cellspacing=6 width="100%" class="table table-bordered dataTables_wrapper">
 <caption><h4>Non-Warranty</h4></caption>
   <thead>
    <tr>
        <th>ID</th>
		<th>Receipt No.</th>
         <th>Started Date</th>
        <th> Status</th>                       
		<th>Customer Name </th>
        <th>Contact No.</th>       
        <th style="width:45px;">Action</th>        
    </tr>
    </thead>
    <tbody>
        

    </tbody>
</table> 
  </span>
 
  </td></tr>
  </table>
</div>
</div>

 
